<?php
@session_start();

//if(!$_SESSION['languaje']) {
	//$_SESSION['languaje'] = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2);
	//header('Location: http://firstclassapartment.com.ar/'.$_SESSION['languaje'].'/index.php');  
	//header('Location: //localhost/firstclassapartmentscordoba/'.$_SESSION['languaje'].'/index.php');
//} else {
	include("../lang/".$_SESSION['languaje'].".php");
//}
include_once '../session_var.php';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang=<?php echo $_SESSION['languaje'];?>>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="<?php echo $index_description;?>">
		<meta name="author" content="Pulce Web Solutions - www.pulce.com.ar">
		<!--Para que las páginas se muestren correctamente y el zoom funcione bien en los dispositivos móviles-->
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="keywords" content="<?php echo $index_keywords;?>">

		<title><?php echo $index_title?></title>

		<!-- bxSlider CSS file -->
		<link href="../css/jquery.bxslider.css" rel="stylesheet" />
		<?php
			include_once('links.php');
			include_once("analytics.php");
		?>

		<!--JQUERY-->
		<script src="http://code.jquery.com/jquery-2.1.0.js"></script>
		
		<!--BOOTSTRAP-->
		<script src="../js/bootstrap.min.js"></script>
		<!--CUSTOM JS-->
		<script src="../js/functions.js"></script>
		<!-- BACKSTRECH -->
		<script src="../js/jquery.backstretch.min.js"></script>
		<!-- DROPDOWN -->
		<script src="../js/dropdown.js"></script>

		<!-- bxSlider Javascript file -->
		<script src="../js/jquery.bxslider.js"></script>
		

		

		<script type="text/javascript">
			$(document).ready(function(){
				$.ajax({
					url: "../ajax.php?"+a('listArchivos')+c('path','./img/galeria/principal/'),
					dataType: 'json',
					async: true,
					success:function(data){
							var imagenes=[];
							$.each( data, function( key, value ) {
						  		imagenes.push( '../img/galeria/principal/' + value);
						  	});

							$.backstretch(imagenes, {duration: 4000,fade:750});
					}
				});
				
				$('.bxslider').bxSlider({
					auto: true ,
					adaptiveHeight: true,
					responsive: true,
					controls: false,
					mode:'fade'
				});
			});
		</script>

	</head>
	<body>
		<div id="menu_bar">
			<?php include_once('menu_bar.php');?>
		</div>
		<div class="container">
			<div id="backstretch">
			</div>
			<div class="row">
				<div class="col-xs-3">
					<div class="row">
						<div class="col-xs-12">
							<!--<div class="box-logo">-->
							<img src="../img/logo_orig.png" class="img-logo" alt="First Class Apartments Cordoba"/>
							<!--</div>-->
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12" style="margin-top:2em;">
							<ul class="bxslider">
								<li>
								  	<div style="cursor:pointer;"  class="booking-comments" onclick="window.open('http://www.booking.com/hotel/ar/first-class-apartments.<?php echo $_SESSION['languaje'];?>.html#tab-reviews');">
										<!--<span style="font-size:0.5em;"><?php echo $index_booking_score;?></span>-->
										<img src="../img/links/booking.png" alt="booking.com">
										<span>
										<?php
											$options = array('http' => array(
											'method'  => 'GET',
											));
											$config= stream_context_create($options);
											$config_final=file_get_contents('http://www.booking.com/hotel/ar/first-class-apartments.'.$_SESSION['languaje'].'.html?#tab-reviews',false, $config);
											preg_match_all("|<div id=\"review_list_score\" class=\"review_list_score_container lang_ltr\">(.*)</div>|sU", $config_final, $tiempo);
											echo $tiempo[1][0];
											?>
										</span>
										<span style="font-size:0.5em;">/10</span>
									</div>
								</li>
								<li>
									<div id="TA_cdsratingsonlynarrow652" class="TA_cdsratingsonlynarrow">
									<ul id="4f7kl4" class="TA_links OfDirpJOss8">
									<li id="KWrAsWou" class="MGY3KnG">
									<a target="_blank" href="http://www.tripadvisor.com.ar/"><img src="http://www.tripadvisor.com.ar/img/cdsi/img2/branding/tripadvisor_logo_transp_340x80-18034-2.png" alt="TripAdvisor"/></a>
									</li>
									</ul>
									</div>
									<script src="http://www.jscache.com/wejs?wtype=cdsratingsonlynarrow&amp;uniq=652&amp;locationId=5005029&amp;lang=es_AR&amp;border=true&amp;backgroundColor=white&amp;display_version=2"></script>
								</li>
								<!--<li>
									<?php/*
										if($_SESSION['languaje']=='en')
											$lang_desp='us';
										else
											$lang_desp=$_SESSION['languaje'];*/
									?>
									<div class="despegar-comments" style="cursor:pointer;" onclick="location.href='http://www.<?php echo $lang_desp;?>.despegar.com/hoteles/h-483990/first-class-apartments-cordoba-cordoba?standard=true'">
										<table>
											<tr>
												<td colspan="2">
													<img src="../img/links/despegar.png" alt="despegar.com" align="center">
												</td>
											</tr>
											<tr>
												<td>
													<div class="despegar-puntos">
													<?php/*
														$options = array('http' => array(
														'method'  => 'GET',
														));
														$config= stream_context_create($options);
														$config_final=file_get_contents('http://www.'.$lang_desp.'.despegar.com/hoteles/h-483990/first-class-apartments-cordoba-cordoba?standard=true',false, $config);
														preg_match_all("|<div class=\"ux-hotels-detail-rate-score\">(.*)</div>|sU", $config_final, $tiempo);
														echo $tiempo[1][0];*/
													?>
													</div>
												</td>
												<td>
													<div class="despegar-calsificacion">
														<?php/*
															$options = array('http' => array(
															'method'  => 'GET',
															));
															$config= stream_context_create($options);
															$config_final=file_get_contents('http://www.'.$lang_desp.'.despegar.com/hoteles/h-483990/first-class-apartments-cordoba-cordoba?standard=true',false, $config);
															preg_match_all("|<div class=\"ux-hotels-detail-rate-text\">(.*)</div>|sU", $config_final, $tiempo);
															echo $tiempo[1][0];*/
														?>
													</div>
												</td>
											</tr>
											<tr>
												<td colspan="2">
													<div class="despegar-recomendado">
														<?php/*
															$options = array('http' => array(
															'method'  => 'GET',
															));
															$config= stream_context_create($options);
															$config_final=file_get_contents('http://www.'.$lang_desp.'.despegar.com/hoteles/h-483990/first-class-apartments-cordoba-cordoba?standard=true',false, $config);
															preg_match_all("|<div class=\"ux-hotels-detail-rate-recommended\">(.*)</div>|sU", $config_final, $tiempo);
															echo $tiempo[1][0];*/
														?>
													</div>
												</td>
											</tr>
										</table>
									</div>
								</li>-->
							</ul>
						</div>
					</div>
				</div>
				<div class="col-xs-5 col-xs-offset-4" style:"float: right;">
					<div class="box-central">
						<h1 class="fcac"><?php echo $index_box_main_title;?></h1>
						<p class="text-index"><?php echo $index_box_main;?></p>
					</div>
					
				</div>
				
			</div>
		</div>
		<div id="footer">
			<?php include("footer.php");?>
		